Skip to content

build(debian): separate Qt5/Qt6 build configurations for V25/V20 support#106

Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
LiHua000:master
Jan 29, 2026
Merged

build(debian): separate Qt5/Qt6 build configurations for V25/V20 support#106
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
LiHua000:master

Conversation

@LiHua000
Copy link
Contributor

@LiHua000 LiHua000 commented Jan 29, 2026

Log: as title

Summary by Sourcery

Build:

  • Add a Qt5-specific debian/control.1 file with appropriate Qt5 build dependencies and package metadata for deepin-boot-maker.

@sourcery-ai
Copy link

sourcery-ai bot commented Jan 29, 2026

Reviewer's Guide

Adjusts Debian packaging to introduce a separate Qt5-based build configuration (via debian/control.1) and simplifies the main debian/control to reference or defer to the new configuration for V25/V20 support.

File-Level Changes

Change Details Files
Introduce a Qt5-specific Debian packaging control file alongside the existing control file to support distinct Qt5/Qt6 build configurations.
  • Add a new debian/control.1 defining the deepin-boot-maker source and binary package using Qt5 build dependencies and related libraries
  • Specify Qt5 build-dependency set (qtbase5*, qttools5*, libqt5svg5-dev, libpolkit-qt5-1-dev, etc.) plus other required system libraries and tools
  • Document package metadata such as maintainer, Vcs links, homepage, and basic runtime Depends for deepin-boot-maker
debian/control.1

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot
Copy link

deepin pr auto review

这段代码是一个 Debian 软件包控制文件(debian/control)的差异对比,主要涉及依赖库从 Qt5 迁移到 Qt6 的变更。

以下是从语法逻辑、代码质量、代码性能和代码安全四个方面进行的详细审查和改进建议:

1. 语法逻辑

  • 变更内容

    • Build-Depends:移除了所有 | (OR) 依赖条件,例如将 qt6-base-dev | qtbase5-dev 改为仅 qt6-base-dev。同样的逻辑应用于 libdtk6widget-devlibpolkit-qt6-1-dev
    • Depends:将运行时依赖 dde-qt6integration | dde-qt5integration 改为仅 dde-qt6integration
    • 新增文件debian/control.1 是一个新文件,内容看起来是修改前的 Qt5 版本的备份或副本。
  • 审查意见

    • 逻辑正确性:从逻辑上看,修改者的意图是完全抛弃 Qt5 支持,强制使用 Qt6 进行构建和运行。这种"硬切换"在语法上是完全合法的。如果项目已经完成了 Qt6 的代码迁移,这种写法是正确的。
    • 文件冗余debian/control.1 文件的出现是不规范的。在 Git 仓库中,通常不应提交名为 .1 的备份文件,这应该是误提交或编辑器自动生成的备份。这会增加仓库的混乱程度。

2. 代码质量

  • 审查意见
    • 向后兼容性破坏:移除 Qt5 的备选依赖意味着该软件包将无法在仅安装了 Qt5 开发环境的旧系统上构建。如果这是为了适配 Deepin 最新的发行版(通常基于 Qt6),这是可以接受的。但如果是通用 Debian 包,这种做法会显著缩小适用范围,降低包的通用性。
    • 依赖一致性:修改确保了构建依赖(Build-Depends)和运行依赖(Depends)都指向了 Qt6 版本的库(如 DTK 和 Polkit),保持了依赖链的一致性,这是良好的做法。
    • 拼写/冗余检查(针对 control.1):在新增的 debian/control.1 文件中,第 13 行出现了两次 qttools5-dev-tools,这是一个明显的重复错误(虽然原 diff 中的 debian/control 没有这个问题)。

3. 代码性能

  • 审查意见
    • 构建性能:移除 | 逻辑对 dpkgapt 解析依赖树的过程有微小的正面影响,减少了解析器需要检查的备选包数量,但这对用户感知的性能影响几乎可以忽略不计。
    • 运行时性能:强制使用 Qt6 可能会带来性能提升(Qt6 相比 Qt5 在渲染和高分屏支持上通常有优化),但这取决于软件本身的代码实现,而非 control 文件。

4. 代码安全

  • 审查意见
    • 供应链安全:强制指定特定版本的大版本库(Qt6)可以减少"依赖混淆"的风险,即防止构建系统错误地加载了过时或不受支持的 Qt5 库。使用更新的 Qt6 库通常意味着包含更多的安全修复和补丁。
    • 信息泄露风险debian/control.1 文件的存在可能泄露旧版本的配置信息,虽然在这个场景下危害不大,但在版本控制中应保持仓库整洁,避免包含敏感或过时的配置文件。

改进建议

  1. 清理仓库

    • 删除 debian/control.1:这个文件看起来是误操作的产物,应该从 Git 仓库中删除,以免造成混淆。可以使用 git rm debian/control.1 移除。
  2. 变更说明

    • 在提交信息中明确指出此次变更是"Breaking Change",即不再支持 Qt5,完全迁移至 Qt6。这有助于维护者和其他开发者理解为何移除了备选依赖。
  3. 检查依赖项名称

    • 确保 qt6-base-devlibdtk6widget-dev 等包名在目标发行版的软件源中确实存在且名称正确。Deepin 的 DTK 库命名有时会随版本变化,需确认 libdtk6widget-dev 是正确的包名(例如,有时可能是 libdtkwidget-dev 但版本号不同,或者确实改名为 dtk6)。
  4. Debian 兼容性检查

    • 如果这个包计划提交到官方 Debian 仓库(而非仅 Deepin 仓库),需确认 Debian 的当前稳定版(如 Bullseye 或 Bookworm)是否已经包含 Qt6 的这些开发包。如果官方 Debian 仓库中 Qt6 包尚不完整或名称不同,这种修改会导致包无法在官方 Debian 上构建。如果仅针对 Deepin V23+,则没有问题。

总结
从 Qt5 迁移到 Qt6 的核心修改在逻辑和依赖管理上是正确的,符合技术演进趋势。主要问题在于误提交了备份文件 debian/control.1,建议立即删除。此外,需注意确认目标发行版对 Qt6 包的支持情况。

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue, and left some high level feedback:

  • In debian/control.1, qttools5-dev-tools appears twice in Build-Depends; consider removing the duplicate entry to keep the dependency list clean.
  • Adding a separate debian/control.1 file alongside debian/control is unconventional; consider documenting or encoding in the filename how this alternative control file is meant to be used (e.g., qt5-specific) to avoid confusion for future maintainers.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In debian/control.1, `qttools5-dev-tools` appears twice in Build-Depends; consider removing the duplicate entry to keep the dependency list clean.
- Adding a separate `debian/control.1` file alongside `debian/control` is unconventional; consider documenting or encoding in the filename how this alternative control file is meant to be used (e.g., qt5-specific) to avoid confusion for future maintainers.

## Individual Comments

### Comment 1
<location> `debian/control.1:37-39` </location>
<code_context>
  syslinux-common [linux-amd64 linux-i386], genisoimage,
- dde-qt6integration | dde-qt5integration
+ dde-qt6integration
 Description: Simple tool for user to create a boot usb stick quickly and easily
  It's designed to support deepin system iso, it can works for Debian and ubuntu
  iso too.
</code_context>

<issue_to_address>
**nitpick (typo):** Tighten up wording/grammar in the package Description.

The description has a few small grammar issues (e.g., “for user” → “for users”, “it can works” → “it can work”). Consider rephrasing to: `Simple tool for users to create a boot USB stick quickly and easily. It is designed to support deepin system ISOs and also works for Debian and Ubuntu ISOs.`
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +37 to +39
Description: Simple tool for user to create a boot usb stick quickly and easily
It's designed to support deepin system iso, it can works for Debian and ubuntu
iso too.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick (typo): Tighten up wording/grammar in the package Description.

The description has a few small grammar issues (e.g., “for user” → “for users”, “it can works” → “it can work”). Consider rephrasing to: Simple tool for users to create a boot USB stick quickly and easily. It is designed to support deepin system ISOs and also works for Debian and Ubuntu ISOs.

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: LiHua000, lzwind

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@LiHua000
Copy link
Contributor Author

/forcemerge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jan 29, 2026

This pr force merged! (status: unstable)

@deepin-bot deepin-bot bot merged commit e64c73a into linuxdeepin:master Jan 29, 2026
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants